﻿namespace PublicModels.Results.TravelSubjectResults
{
    /// <summary>
    /// 救援信息查询结果
    /// </summary>
    public class RescueInfoResult : Result, IAPIResultProvider<Place>
    {
        public QueryApiResult<Place>? QueryResultFrom3rdPartyApi { get; set; }

        /// <summary>
        /// 周边医疗机构
        /// </summary>
        public List<PoiResult>? Hospitals { get; set; }

        /// <summary>
        /// 推荐救援路线
        /// </summary>
        public List<Step>? RecommendedRoute { get; set; }

        /// <summary>
        /// 推荐的医院
        /// </summary>
        public PoiResult? RecommendedHospital { get; set; }

        /// <summary>
        /// 距离
        /// </summary>
        public int Distance { get; set; }

        /// <summary>
        /// 预计时间
        /// </summary>
        public int Duration { get; set; }

        /// <summary>
        /// 获取是否有可用的医疗点
        /// </summary>
        public bool HasRecommendedHospital
        {
            get
            {
                if (Hospitals == null || Hospitals.Count == 0)
                    return false;
                return true;
            }
        }
    }
}
